import React, { Component } from 'react'
import Search from './components/search/search'
import List from './components/list/list'
export default class App extends Component {
    state = {
        users:[],//初始化数组
        isFirst:true, //第一次打开
        isloding:false, //是否处于加载中
        err:'' //存储相关的错误信息
    }
    setAppState = (stateObj) =>{
        this.setState(stateObj)
    }
    render() {
        return (
            <div className="container">
                <Search setAppState={this.setAppState} />
                <List {...this.state}/>
            </div>
        )
    }
}
